package com.kgc.skProvider.controller;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.collection.remote.SalesCollectionRefundRemote;
import com.kgc.skProvider.service.SalesCollectionRefundService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import java.util.Map;

@Controller
public class SalesCollectionRefundController implements SalesCollectionRefundRemote {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private SalesCollectionRefundService salesCollectionRefundService;


    @Override
    public ResponseMsg selectSalesCollectionRefundByPage(Map<String, Object> map) {
        logger.info("SalesCollectionRefundController selectSalesCollectionRefundByPage params is{}",map.toString());
        ResponseMsg responseMsg = salesCollectionRefundService.selectSalesCollectionRefundByPage(map);
        logger.debug("SalesCollectionRefundController selectSalesCollectionRefundByPage return is{}",map.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg insertSalesCollectionRefund(Map<String, Object> map) {
        logger.info("SalesCollectionRefundController insertSalesCollectionRefund params is{}",map.toString());
        ResponseMsg responseMsg = salesCollectionRefundService.insertSalesCollectionRefund(map);
        logger.debug("SalesCollectionRefundController insertSalesCollectionRefund is{}",map.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg deleteSalesCollectionRefund(Map<String, Object> map) {
        logger.info("SalesCollectionRefundController deleteSalesCollectionRefund params is{}",map.toString());
        ResponseMsg responseMsg = salesCollectionRefundService.deleteSalesCollectionRefund(map);
        logger.debug("SalesCollectionRefundController deleteSalesCollectionRefund is{}",map.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg updateSalesCollectionRefund(Map<String, Object> map) {
        logger.info("SalesCollectionRefundController updateSalesCollectionRefund params is{}",map.toString());
        ResponseMsg responseMsg = salesCollectionRefundService.updateSalesCollectionRefund(map);
        logger.debug("SalesCollectionRefundController updateSalesCollectionRefund is{}",map.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg checkSalesCollectionRefund(Map<String, Object> map) {
        logger.info("SalesCollectionRefundController checkSalesCollectionRefund params is{}",map.toString());
        ResponseMsg responseMsg = salesCollectionRefundService.checkSalesCollectionRefund(map);
        logger.debug("SalesCollectionRefundController checkSalesCollectionRefund is{}",map.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg selectSalesCollectionRefundByCode(Map<String, Object> map) {
        logger.info("SalesCollectionRefundController selectSalesCollectionRefundByCode is{}",map.toString());
        ResponseMsg responseMsg = salesCollectionRefundService.selectSalesCollectionRefundByCode(map);
        logger.debug("SalesCollectionRefundController selectSalesCollectionRefundByCode is{}",map.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg selectSalesCollectionRefundDetailByCode(Map<String, Object> map) {
        logger.info("SalesCollectionRefundController selectSalesCollectionRefundDetailByCode is{}",map.toString());
        ResponseMsg responseMsg = salesCollectionRefundService.selectSalesCollectionRefundDetailByCode(map);
        logger.debug("SalesCollectionRefundController selectSalesCollectionRefundDetailByCode is{}",map.toString());
        return responseMsg;
    }
}
